import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

// export default new Vuex.Store({
//   state: {
//   },
//   mutations: {
//   },
//   actions: {
//   },
//   modules: {
//   }
// })

 const store = new Vuex.Store({
  state: {
    banner:null,
    userinfo:null,
    userlist:null,
  },
  mutations: {
    changeBanner(state,payload){
      state.banner = payload;
    },
    //头部用户信息缓存优化
    changeUserinfo(state,payload){
      state.userinfo = payload;
    },
    //用户列表的缓存优化
    changeUserlist(state,payload){
      state.userlist = payload;
    }
  },
  actions: {
  },
  modules: {
  }
})


export default store;
